<script lang="ts" setup>
import { getCurrentInstance, navigateTo } from '@tarojs/taro';

/**
 * @description 当前路由信息
 */
const params = getCurrentInstance().router?.params as {
  id: string;
  from?: string;
  assetId?: string;
};
</script>

<template>
  <view class="work-order-handle-more app-page--1">
    <app-navbar title="工单处理" />
    <scroll-view class="app-page__wrapper" :scroll-y="true" :lower-threshold="100">
      <view class="work-order-handle-more__wrapper">
        <nut-cell-group>
          <nut-cell
            title="工单挂起"
            is-link
            @click="
              navigateTo({
                url: `/pages/work-order/suspend/index?id=${params.id}&from=${params.from}&assetId=${params.assetId}`,
              })
            "
          />
          <nut-cell
            title="工单协同"
            is-link
            @click="
              navigateTo({
                url: `/pages/work-order/cooperate/index?id=${params.id}&from=${params.from}&assetId=${params.assetId}`,
              })
            "
          />
          <nut-cell
            title="耗材领用"
            is-link
            @click="
              navigateTo({
                url: `/pages/spare/list/index?orderId=${params.id}&from=${params.from}&assetId=${params.assetId}`,
              })
            "
          />
        </nut-cell-group>
      </view>
    </scroll-view>
  </view>
</template>

<style lang="scss">
.work-order-handle-more {
  &__wrapper {
    padding: 20px;
  }
}
</style>
